* TODO LIST
** ATmega64 change

   Change the main chip to ATmega64, libraris to change

*** IO/ports
*** usart
*** spi
*** i2c/twi
*** EEPROM
*** Makefile

** Code

*** Compile multiple dirs 
    
    Because of the creation of the directory src/Sensors/ the make 
     all rule can't compile, it would be nice to have different
    directories only for sensors drivers, review the way to 
    include them in a Makefile or various Makefiles.

    *MOMENTARY* All content inside src/Sensors/ have been moved to src/
    It is needed to test creating makefiles to each directory of source like
    a folder src/Sensors, then these individual makefiles should be included
    to the root Makefile to build the whole project.

*** Control while(1) routines [DOING]

    The program should never be in while(1) state unless it is the main program
    itself,  so it is needed to review all drivers and change them to never
    enter to an infinite bucle.

**** Multiple definitios [DONE]

     Getting errors including [[file:ProgMemStrings.h][ProgMemStrings.h]] In different files
     like:

     objs/../DataLogger.o:(.progmem.data+0xcb): definiciones múltiples de `STR_hs11'
     objs/../main.o:(.progmem.data+0x103): primero se definió aquí
     objs/../ProgMemStrings.o:(.progmem.data+0xcb): definiciones múltiples de `STR_hs11'
     objs/../main.o:(.progmem.data+0x103): primero se definió aquí

    Tried to create a ProgMemStrings.c File but as PROGMEM attr 
    requieres const, Strings cannot be modified in the .c
    
***** SOLUTION
      
      Created another File to Link program memory strings to all
      other modules, the File [[file:ProgMemLink.h][ProgMemLink.h]]
      
*** Debug mode Switch

    Using a switch enable or disable Debug mode

**** String concat and copy
    
    I was miss-using strings and pointers trying to modify strings through 
    pointers like char* s = character because those pointers are
    not being managed properly,

    *NOTE* Review the use of strings.h or review dynamic memory
    allocation.

    *NOTE* For some reason the file [[file:SD_generic.c][SD_generic.c]] did not update when I changed
    [[file:FAT32.h][FAT32.h]] it a Makefile problem or the headers are not properly
    included?

    *CONCLUSION* I will use sprintf to copy and cancatenate strings. 
    The SD routines are working properly.

**** Error on File operations on SD [SOLVED]

     The error happens after a file is writen it shows:
     the error "File does not exist"
     It also happens after reading the file appears:
     the error "File does not exist"

     *NOTE* 
     I have found one mistake, it is with FileName
     the function convertFileName in FAT32.c seems to be doing
     strange stuff to the file name and it is also limitating it 
     to just 11 chars and only caps, why is that?
     I have to be carefull when editing this FileName format 
     because other functions like findFiles rely on this file
     format.

     *SOLUTION 1*
     I have modified the convertFileName in FAT32.c now there is
     no problems when writing Files to the SD card, and no more
     memory sabled !
     There is a funny thing the file logs with and aditional dot:
     DATE..l ? 

*** Logging a File takes too long!

    Seems to be that the LogIntoFile(...) function in [[file:DataLogger.c][DataLogger.c]]
    takes about 5 seconds to write results from sensors un a File!

    Maybe because to many calls to SD_writeFile(...) function from
    LogIntoFile(...) function.
    Would it be faster to call that function the least 

**** Possible Cause ?
     The longer the file becomes, the longer it takes to 
     append data. The FAT32 library using goes until the end of the 
     file before append data, and in the way it calculates the 
     NextCluster. So it takes long time to append data in a file
     bigger than 1K (more than 3 seconds).

**** Possible Solutions

     A possible solution could be to calculate the nextCluster available
     for the file without going through all of it. (maybe using 'fileSize')
     
     Other solution can be writting only to small files and create new
     files when a file corresponding to a date exceds the acceptable size.
     There will be necessary a register and checking for filenames that
     belong to the same date, and when creating a new file increasing a 
     number. i.e

     10-03-16.1.l
     10-03-16.2.l
     ...
     10-03-16.10.l
     10-03-16.11.l

     Maybe the acceptable size could be < 1024 bytes
     
   Doing better tests it seems that appending data to a File takes about
   4 - 5 seconds (The sampling have been going for more than an hour by now
   loggin every 12 seconds (it must be more than 1 KiB).


*** Optimize TimeCheck Algorithm

    it is actually using (nasty calculations *, %, / ), tried
    to use  << and >> but it was not working properly, there must
    be a better way to do it.

*** Printf

**** come (,) instead of dot (.)

     Libre office calc expects decimal notation using ` , ` but
     printf uses ` . ` 
     Is it possible to change printf to use ` . `. Another option
     will be to tell libreoffice calc to use ` . ` for decimal
     notation (that is not the default.

** Sensors

*** Temperature

*** Relative Humidity

*** Wind speed sensor (anemometer?)    

    To buy an anemometer seems to be expensive, so there may be 
    necessary to build one, future constructions will be placed
    in Docu/
